Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

apollo-link-batch

Package Overview
Dependencies
Maintainers
3
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apollo-link-batch

Apollo Link that performs batching and operation on batched Operations

  • 1.1.15
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
23K
increased by12.87%
Maintainers
3
Weekly downloads
 
Created
Source

Purpose

An Apollo Link to allow batching of multiple operations into a single request. For example, the apollo-link-batch-http uses this link to batch operations into a single http request.

Installation

npm install apollo-link-batch --save

Usage

import { BatchLink } from "apollo-link-batch";

const link = new BatchLink({
  batchHandler: (operations: Operation[], forward: NextLink) => Observable<FetchResult[]> | null
});

Options

Batch Link takes an object with three options on it to customize the behavior of the link. The only required option is the batchHandler function

namevaluedefaultrequired
batchIntervalnumber10false
batchMaxnumber0false
batchHandler(operations: Operation[], forward: NextLink) => Observable<FetchResult[]>nullNA

Context

The Batch Link does not use the context for anything

FAQs

Package last updated on 09 Apr 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc